#include <stdio.h>

int main()
{
	int i ,x;
	scanf("%d",&i);
	if(i <=100000)
	   x = i *0.1;
	   if(i > 100000 && i <= 200000)
	      x = 10000 + (i - 100000)*0.075;
	        if(i > 200000 && i <=400000)
	         x = 17500  +(i -200000)*0.05;
	          if(i > 400000 && i <=600000)
	            x = 27500 + (i -400000)*0.03;
	           if(i > 600000 && i <=1000000)
	             x = 33500 +(i -600000)*0.015;
	             if(i > 1000000)
	                x = 39500+ (i -1000000)*0.01;
	          
	          printf("%d",x);
	return 0;
}
